package com.agileboot.domain.system.file.dto;

import cn.hutool.core.bean.BeanUtil;
import com.agileboot.domain.system.file.db.SysFileEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;

/**
 * 系统文件数据传输对象
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class SysFileDTO {

    public SysFileDTO(SysFileEntity entity) {
        if (entity != null) {
            BeanUtil.copyProperties(entity, this);
        }
    }

    private Long fileId;

    private String fileName;

    private String fileKey;

    private String fileSuffix;

    private String fileType;

    private Long fileSize;

    private String storageType;

    private String url;

    private String bizType;

    private Long bizId;

    private String remark;

    private Long creatorId;

    private Date createTime;

    private Long updaterId;

    private Date updateTime;

    /**
     * 数据数量（用于导出文件列表，表示导出的记录数）
     */
    private Integer dataCount;
}

